extern crate unmp_id;

use unmp_id::*;

#[test]
fn test() {
    let id0 = BlockchainId::new([0; 32]);
    let id0_raw = id0.id();
    assert_eq!(id0_raw.len(), 33);
    let id1 = BlockchainId::new([1; 32]);
    let id1_raw = id1.id();
    assert_eq!(id1_raw.len(), 33);

    let id0_tmp = BlockchainId::try_from(&id0_raw).unwrap();
    assert_eq!(id0, id0_tmp);
    let id1_tmp = BlockchainId::try_from(&id1_raw).unwrap();
    assert_eq!(id1, id1_tmp);
}
